<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include "function_net_bridge.php";

$in_array['Name'] = $_POST['devname'];
$in_array['DHCP'] = $_POST['dhcp'];
$in_array['Ports'] = $_POST['txt_selbranch'];
$in_array['IpMigration'] = $_POST['ipmigration'];
$in_array['Stp']= $_POST['stp'];
$in_array['Enabled']= $_POST['enabled'];

if ($in_array['DHCP'] == 0){
	$in_array['Ip'] = $_POST['ip'];
	$in_array['Mask']= $_POST['mask'];
}

AppendXmlNetDevOneBridge($in_array);

include_once "function_misc_log.php";
logger("Add", $in_array, "bridge");

//echo("<meta http-equiv='refresh'content=0;URL='net_dev_bridge_list.php'>");
include "function_web_misc.php";
PrintSuccessPageAndJump('net_dev_bridge_list.php');
?>
